package org.wk;

class Grandparent {
    public Grandparent() {
        System.out.println("Grandparent constructor called");
    }
}

class Parent extends Grandparent {
    public Parent() {
        super();  // 显式调用父类构造方法
        System.out.println("Parent constructor called");
    }
}

class Child01 extends Parent {
    public Child01() {
        super();  // 显式调用父类构造方法
        System.out.println("Child constructor called");
    }

    public static void main(String[] args) {
        Child01 child = new Child01();
    }
}
